#!/bin/bash


SUDO="sudo "
if [[ $(id -u) -eq 0 ]]; then SUDO=""; fi

if [[ ! -x /usr/bin/7z ]]; then
    $SUDO wget https://7-zip.cn/a/7z2405-linux-x64.tar.xz
    tar xvf 7z2405-linux-x64.tar.xz 7zz
    $SUDO mv 7zz /usr/bin/7z
    $SUDO chmod a+x /usr/bin/7z
    $SUDO rm -rf 7z2405-linux-x64.tar.xz
fi
